package com.jlkf.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jlkf.dao.TblOtherCourseMapper;
import com.jlkf.dao.TblUploadMapper;
import com.jlkf.pojo.TblOtherCourse;
import com.jlkf.pojo.TblUpload;
import com.jlkf.service.OtherService;
import com.platform.server.response.response.pojo.ReturnData;

@Service
public class OtherServiceImpl implements OtherService{
	@Autowired
	private TblOtherCourseMapper tblOtherCourseMapper;
	@Autowired
	private TblUploadMapper tblUploadMapper;
	
	@Override
	public List<TblOtherCourse> getListByType(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return tblOtherCourseMapper.selectByType(map);
	}

	@Override
	public int insert(TblOtherCourse course) {
		// TODO Auto-generated method stub
		return tblOtherCourseMapper.insertSelective(course);
	}

	@Override
	public TblOtherCourse getDetail(Integer gId) {
		// TODO Auto-generated method stub
		return tblOtherCourseMapper.selectByPrimaryKey(gId);
	}

	@Override
	public int delete(Integer gId) {
		// TODO Auto-generated method stub
		return tblOtherCourseMapper.deleteByPrimaryKey(gId);
	}

	@Override
	public int update(TblOtherCourse course) {
		// TODO Auto-generated method stub
		return tblOtherCourseMapper.updateByPrimaryKeySelective(course);
	}

	@Override
	public List<TblUpload> getList() {
		// TODO Auto-generated method stub
		return tblUploadMapper.selectList();
	}

	@Override
	public int insertUpload(TblUpload upload) {
		// TODO Auto-generated method stub
		return tblUploadMapper.insertSelective(upload);
	}

	@Override
	public int deleteUpload(Integer id) {
		// TODO Auto-generated method stub
		return tblUploadMapper.deleteByPrimaryKey(id);
	}

}
